package com.woniuxy.commons.service.sale;

import com.woniuxy.commons.entity.sale.vo.sale.SoAccountVo;
import com.woniuxy.commons.result.Result;
import com.woniuxy.commons.service.sale.factory.SaleServiceFactory;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * <P> @Author: ideaAdmin
 * <P> TODO: Class
 * <P> TODO: 销售模块的接口
 * <P> Date: 2022/4/22:9:58
 * <P> Description:
 */
@FeignClient(name = "sale", fallbackFactory = SaleServiceFactory.class)
public interface SaleService {

    @ApiOperation(value = "获得所有的数据字典")
    @GetMapping("/sale/soAccount/dict")
    public Result get();

    @PostMapping("/sale/soAccount/findSoAccountAll/{currentPage}/{limit}")
    public Result findSoAccountAll(@PathVariable("currentPage") Integer currentPage,
                                   @PathVariable("limit") Integer limit,
                                   @RequestBody SoAccountVo soAccountVo);


    @GetMapping("/sale/chooseProduce/findChooseProduceBySoId/{currentPage}/{limit}/{soId}")
    public Result findChooseProduceBySoId(@PathVariable(value = "soId") Integer soId,
                                          @PathVariable(value = "currentPage") Integer currentPage,
                                          @PathVariable(value = "limit") Integer limit);


    /**
     * <P>Author ideaAdmin
     * <P>TODO: 根据选货单id 获得它所有的选货信息
     * <P>Date 11:42 2022/4/21
     * <P>* @param soId
     * <P>* @return com.woniuxy.commons.result.Result
     **/
    @ApiOperation(value = "根据选货单id 获得它所有的选货信息 ")
    @PostMapping("/sale/soAccount/findSoAccountById/{soId}")
    public Result findSoAccountById(@RequestBody SoAccountVo soAccountVo);





}
